package com.wootion.cims.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.wootion.cims.module.communitymerchant.dto.ShopDto;
import com.wootion.cims.module.communitymerchant.excel.ShopExcel;
import com.wootion.cims.module.communitymerchant.model.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: LanQiang
 * @Date: 2023/01/04/15:31
 * @Description: 作用xxx
 */
@Mapper
public interface ShopDao extends BaseMapper<Shop> {
    /**
     * 社区商户列表分页查询
     * @param page
     * @param category
     * @param keyWord
     * @param communityIds
     * @return
     */
    PageDTO<ShopDto> pageList(@Param("page")Page<ShopDto> page,
                              @Param("category")String category,
                              @Param("keyWord")String keyWord,
                              @Param("communityIds")List<String> communityIds);
    /**
     * 批量删除商户信息
     * @param ids
     * @return
     */
    int updateBatchByIds(@Param("ids") List<String> ids);

    /**
     * 商户excel导出
     * @param communityIds
     * @param ids
     * @param category
     * @param keyWord
     * @return
     */
    List<ShopExcel> shopExcel(@Param("communityIds") List<String> communityIds,
                              @Param("ids")List<String> ids,
                              @Param("category")String category,
                              @Param("keyWord")String keyWord);
}
